<template>
	<view>
		<view class="modal" v-if="showNotice">
			<view class="mask">	
			</view>
			<view class="container">
				<view class="title">提示</view>
				<view class="content">
					<view>特种车辆（包括但不限于叉车、吊车、铲车等）及大型货车（车长超过6m且总质量4500千克以上），工作日入校需校内联络单位提交由单位主要负责人签字、盖章的纸质申请单（制式模板链接：https://bwc.ustc.edu.cn/2022/0921/c5655a570603/page.htm）。进出校时间应避开上下班（学）高峰期（7:30-8:30，13:50-14:20，17:30-18:20）。</view>
				</view>
				<view class="btns">
					<button class="active" type="default" @click="copy">复制链接</button>
					<button  type="default" @click="close">关闭</button>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"carNotice",
		props: {
			showNotice: {
				type: Boolean,
				default: false
			}
		},
		data() {
			return {
				
			}
		},
		methods: {
			close() {
				this.$emit('update:show-notice', false)
			},
			copy() {
				uni.setClipboardData({
					data: 'https://bwc.ustc.edu.cn/2022/0921/c5655a570603/page.htm',
					success: () => {
						this.close()
					}
				})
			}
		}
	}
</script>

<style lang="scss">
.btns {
	width: 100%;
	display: flex;
	align-items: center;
	padding: 0 rpx;
}
.modal {
	.mask {
		position: fixed;
		top: 0;
		left: 0;
		width: 100vw;
		height: 100vh;
		background-color: rgba(0,0,0,0.6);
		z-index: 99999;
	}
	.container {
		position: fixed;
		top: 15%;
		left: 50%;
		transform: translateX(-50%);
		width: 650rpx;
		min-height: 760rpx;
		padding: 40rpx 30rpx;
		background: #fff;
		border-radius: 6px;
		display: flex;
		flex-direction: column;
		align-items: center;
		z-index: 99999;
		
		.title {
			line-height: 1.6;
			font-size: 36rpx;
			font-weight: 800;
		}
		.content {
			margin: 20rpx 0;
			flex: 1;
			overflow-y: scroll;
			display: flex;
			align-items: center;
			font-size: 36rpx;
			white-space: pre-line;
			word-break: break-all;
			
			view {
				max-height: 50vh;
				padding: 10rpx 0;
			}
		}
		button {
			width: 300rpx;
			margin: 20rpx;
			&.active {
				background-color: #004D95;
				color: #FFFFFF;
			}
		}
	}
}
</style>